
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" template="/template/main.xhtml">

	<ui:define name="body">
		<h:form>
			<p:toolbar  >
				<p:toolbarGroup align="left">
					<p:commandButton  title="#{messages['button.new']}" icon="ui-icon-document" action="#{formaRecebimentoListMB.getNextView}"
						actionListener="#{formaRecebimentoListMB.clear}" ajax="false" />

					<p:commandButton  title="#{messages['button.delete']}" icon="ui-icon-trash" onclick="confirmation.show()"
						type="button" immediate="true" ajax="false" />

					<p:dialog style="position: absolute; left:50px; top:50px;"  message="#{messages['label.confirm.delete']}" showEffect="bounce" hideEffect="explode"
						header="#{messages['label.dialog.alert']}!" severity="alert" widgetVar="confirmation">

						<h:commandButton value="#{messages['button.dialog.yes']}" action="#{formaRecebimentoListMB.deleteSelection}"
							actionListener="#{formaRecebimentoListMB.clear}" />
						<h:commandButton value="#{messages['button.dialog.no']}" onclick="confirmation.hide()" type="button" />
					</p:dialog>
				</p:toolbarGroup>
			</p:toolbar>
			<div style="overflow: auto; width: 100%; height: 600;"> <p:dataTable id="list" var="bean" value="#{formaRecebimentoListMB.resultList}">
				<f:facet name="header">#{messages['formaRecebimento.list.table.title']}</f:facet>
				<p:column style="width:1%;">
					<h:selectBooleanCheckbox value="#{formaRecebimentoListMB.selection[bean.id]}"></h:selectBooleanCheckbox>
				</p:column>
				
				<p:column style="width:5%;font-size:12;" sortBy="#{bean.id}">
					<f:facet name="header">#{messages['formaRecebimento.label.id']}</f:facet>
					<h:outputText value="#{bean.id}" />
				</p:column>
						
				<p:column style="font-size:12;" sortBy="#{bean.descricao}">
					<f:facet name="header">#{messages['formaRecebimento.label.descricao']}</f:facet>
					<h:commandLink action="#{formaRecebimentoListMB.getNextView}" actionListener="#{formaRecebimentoListMB.clear}">
						<h:outputText value="#{bean.descricao}" />
						<f:param name="id" value="#{bean.id}" />
					</h:commandLink>
				</p:column>
						
			</p:dataTable></div>
		</h:form>

	</ui:define>
</ui:composition>